About the source code

The source code for the commands may look a bit unusual. The reason for this is that I wanted the resulting executables to be both relatively small and ``pure'', just like Commodore's, without resorting to assembler. Therefore they are written to be linked without any startup code and they don't use global variables, only constants. To emphasize the lack of startup code, there are no main() functions. Instead each program starts with a function, that has to be the first one, called entrypoint() where execution will begin. Add the built-in ANSI C string functions and the #pragma libcall and #pragma syscall capability of SAS/C 5.10 and you end up with little programs that don't have to be linked with anything, apart from the small linker library containing functions common to several of the commands (except FIND, which is linked with SAS lcr.lib and amiga.lib because it calls setjmp(), longjmp(), and amiga.lib/SetRexxVar()).

Even though the use of #pragmas make the source code somewhat SAS/C specific (global library base pointers are unnecessary), it shouldn't be too difficult to port it to other compilers like DICE or GNU C. Should you decide to port it, please note that the #pragma syscalls have made it unnecessary for me to set the exec.library base pointer, SysBase, at all.